﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

using IronOne.SalesOne.BusinessObjects;
using IronOne.SalesOne.DataObjects;
namespace Facade
{
    public class CodeFacade
    {

        #region Country

        LinqCountry linqcodecountry = new LinqCountry();
       
        [DataObjectMethod(DataObjectMethodType.Select)]
        public Country GetCountry(int codeId)
        {
            //chnage below
            return linqcodecountry.GetCountry(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Country> GetCountries(string sortExpression, int page)
        {
            //chnage below
            return linqcodecountry.GetCountries(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Country> GetCountries(string sortExpression)
        {
            //chnage below
            return linqcodecountry.GetCountries(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCodeCountry(Country code)
        {
            linqcodecountry.InsertCodeCountry(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int Updatecountry(Country code)
        {
            return linqcodecountry.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeCountry(Country code)
        {
            return linqcodecountry.DeleteCodeCountry(code);
        }

        #endregion

        #region ClaimStatus

        LinqClaimStatus cs = new LinqClaimStatus();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public ClaimStatus GetClaimStatus(int codeId)
        {
            return cs.GetClaimStatus(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<ClaimStatus> GetClaimStatuss(string sortExpression, int page)
        {
            return cs.GetClaimStatuss(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<ClaimStatus> GetClaimStatuss(string sortExpression)
        {
            return cs.GetClaimStatuss(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(ClaimStatus code)
        {
            cs.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateClaimStatus(ClaimStatus code)
        {
            return cs.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeClaimStatus(ClaimStatus code)
        {
            return cs.DeleteCodeClaimStatus(code);
        }

        #endregion

        #region CompaintSubType

        LinqCompaintSubType cst = new LinqCompaintSubType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public CompaintSubType GetCompaintSubType(int codeId)
        {
            return cst.GetCompaintSubType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<CompaintSubType> GetCompaintSubTypes(string sortExpression, int page)
        {
            return cst.GetCompaintSubTypes(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<CompaintSubType> GetCompaintSubTypes(string sortExpression)
        {
            return cst.GetCompaintSubTypes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(CompaintSubType code)
        {
            cst.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateCompaintSubType(CompaintSubType code)
        {
            return cst.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeCompaintSubType(CompaintSubType code)
        {
            return cst.DeleteCodeCompaintSubType(code);
        }

        #endregion
        #region CompetionType

        LinqCompetionType ct = new LinqCompetionType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public CompetionType GetCompetionType(int codeId)
        {
            return ct.GetCompetionType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<CompetionType> GetCompetionTypes(string sortExpression,int page)
        {
            return ct.GetCompetionTypes(sortExpression,page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<CompetionType> GetCompetionTypes(string sortExpression)
        {
            return ct.GetCompetionTypes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(CompetionType code)
        {
            ct.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateCompetionType(CompetionType code)
        {
            return ct.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeCompetionType(CompetionType code)
        {
            return ct.DeleteCodeCompetionType(code);
        }

        #endregion
        #region ComplaintStatus

        LinqComplaintStatus cmst = new LinqComplaintStatus();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public ComplaintStatus GetComplaintStatus(int codeId)
        {
            return cmst.GetComplaintStatus(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<ComplaintStatus> GetComplaintStatuss(string sortExpression, int page)
        {
            return cmst.GetComplaintStatuss(sortExpression, page);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<ComplaintStatus> GetComplaintStatuss(string sortExpression)
        {
            return cmst.GetComplaintStatuss(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(ComplaintStatus code)
        {
            cmst.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateComplaintStatus(ComplaintStatus code)
        {
            return cmst.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeComplaintStatus(ComplaintStatus code)
        {
            return cmst.DeleteCodeComplaintStatus(code);
        }

        #endregion
        #region ComplaintType
        LinqComplaintType cmpt = new LinqComplaintType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public ComplaintType GetComplaintType(int codeId)
        {
            return cmpt.GetComplaintType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<ComplaintType> GetComplaintTypes(string sortExpression, int page)
        {
            return cmpt.GetComplaintTypes(sortExpression, page);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(ComplaintType code)
        {
            cmpt.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateComplaintType(ComplaintType code)
        {
            return cmpt.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeComplaintType(ComplaintType code)
        {
            return cmpt.DeleteCodeComplaintType(code);
        }

        #endregion
        #region IDType

        LinqIDType cid = new LinqIDType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public IDType GetIDType(int codeId)
        {
            return cid.GetIDType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<IDType> GetIDTypes(string sortExpression,int page)
        {
            return cid.GetIDTypes(sortExpression,page);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<IDType> GetIDTypes(string sortExpression)
        {
            return cid.GetIDTypes(sortExpression);
        }


        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(IDType code)
        {
            cid.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateIDType(IDType code)
        {
            return cid.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeIDType(IDType code)
        {
            return cid.DeleteCodeIDType(code);
        }

        #endregion
        #region InformationType

        LinqInformationType it = new LinqInformationType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public InformationType GetInformationType(int codeId)
        {
            return it.GetInformationType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<InformationType> GetInformationTypes(string sortExpression, int page)
        {
            return it.GetInformationTypes(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<InformationType> GetInformationTypes(string sortExpression)
        {
            return it.GetInformationTypes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(InformationType code)
        {
            it.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateInformationType(InformationType code)
        {
            return it.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeInformationType(InformationType code)
        {
            return it.DeleteCodeInformationType(code);
        }

        #endregion
        #region MaritalStatus
        LinqMaritalStatus ms = new LinqMaritalStatus();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public MaritalStatus GetMaritalStatus(int codeId)
        {
            return ms.GetMaritalStatus(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<MaritalStatus> GetMaritalStatuss(string sortExpression, int page)
        {
            return ms.GetMaritalStatuss(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<MaritalStatus> GetMaritalStatuss(string sortExpression)
        {
            return ms.GetMaritalStatuss(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCode(MaritalStatus code)
        {
            ms.InsertCode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateMaritalStatus(MaritalStatus code)
        {
            return ms.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeMaritalStatus(MaritalStatus code)
        {
            return ms.DeleteCodeMaritalStatus(code);
        }

        #endregion
        #region Measure

        LinqMeasure m = new LinqMeasure();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public Measure GetMeasure(int codeId)
        {
            return m.GetMeasure(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Measure> GetMeasures(string sortExpression, int page)
        {
            return m.GetMeasures(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Measure> GetMeasures(string sortExpression)
        {
            return m.GetMeasures(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertMeasure(Measure code)
        {
            m.InsertMeasure(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateMeasure(Measure code)
        {
            return m.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeMeasure(Measure code)
        {
            return m.DeleteCodeMeasure(code);
        }

        #endregion
        #region Month

        LinqMonth mnt = new LinqMonth();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public Month GetMonth(int codeId)
        {
            return mnt.GetMonth(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Month> GetMonths(string sortExpression,int page)
        {
            return mnt.GetMonths(sortExpression,page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Month> GetMonths(string sortExpression)
        {
            return mnt.GetMonths(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertCodeMonth(Month code)
        {
            mnt.InsertCodeMonth(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateMonth(Month code)
        {
            return mnt.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeMonth(Month code)
        {
            return mnt.DeleteCodeMonth(code);
        }

        #endregion
        #region PaymentMode
        LinqPaymentMode pm = new LinqPaymentMode();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public PaymentMode GetPaymentMode(int codeId)
        {
            return pm.GetPaymentMode(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PaymentMode> GetPaymentModes(string sortExpression,int page)
        {
            return pm.GetPaymentModes(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PaymentMode> GetPaymentModes(string sortExpression)
        {
            return pm.GetPaymentModes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertPaymentMode(PaymentMode code)
        {
            pm.InsertPaymentMode(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdatePaymentMode(PaymentMode code)
        {
            return pm.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodePaymentMode(PaymentMode code)
        {
            return pm.DeleteCodePaymentMode(code);
        }

        #endregion
        #region PendingRequirement

        LinqPendingRequirement pr = new LinqPendingRequirement();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public PendingRequirement GetPendingRequirement(int codeId)
        {
            return pr.GetPendingRequirement(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PendingRequirement> GetPendingRequirements(string sortExpression, int page)
        {
            return pr.GetPendingRequirements(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PendingRequirement> GetPendingRequirements(string sortExpression)
        {
            return pr.GetPendingRequirements(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertPendingRequirement(PendingRequirement code)
        {
            pr.InsertPendingRequirement(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdatePendingRequirement(PendingRequirement code)
        {
            return pr.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodePendingRequirement(PendingRequirement code)
        {
            return pr.DeleteCodePendingRequirement(code);
        }

        #endregion
        #region PendingStatus

        LinqPendingStatus ps = new LinqPendingStatus();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public PendingStatus GetPendingStatus(int codeId)
        {
            return ps.GetPendingStatus(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PendingStatus> GetPendingStatuss(string sortExpression, int page)
        {
            return ps.GetPendingStatuss(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PendingStatus> GetPendingStatuss(string sortExpression)
        {
            return ps.GetPendingStatuss(sortExpression);
        }
        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertPendingStatus(PendingStatus code)
        {
            ps.InsertPendingStatus(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdatePendingStatus(PendingStatus code)
        {
            return ps.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodePendingStatus(PendingStatus code)
        {
            return ps.DeleteCodePendingStatus(code);
        }

        #endregion
        #region PolicyStatus

        LinqPolicyStatus pls = new LinqPolicyStatus();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public PolicyStatus GetPolicyStatus(int codeId)
        {
            return pls.GetPolicyStatus(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PolicyStatus> GetPolicyStatuss(string sortExpression, int page)
        {
            return pls.GetPolicyStatuss(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PolicyStatus> GetPolicyStatuss(string sortExpression)
        {
            return pls.GetPolicyStatuss(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertPolicyStatus(PolicyStatus code)
        {
            pls.InsertPolicyStatus(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdatePolicyStatus(PolicyStatus code)
        {
            return pls.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodePolicyStatus(PolicyStatus code)
        {
            return pls.DeleteCodePolicyStatus(code);
        }

        #endregion
        #region PolicyType

        LinqPolicyType pt = new LinqPolicyType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public PolicyType GetPolicyType(int codeId)
        {
            return pt.GetPolicyType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PolicyType> GetPolicyTypes(string sortExpression, int page)
        {
            return pt.GetPolicyTypes(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<PolicyType> GetPolicyTypes(string sortExpression)
        {
            return pt.GetPolicyTypes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertPolicyType(PolicyType code)
        {
            pt.InsertPolicyType(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdatePolicyType(PolicyType code)
        {
            return pt.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodePolicyType(PolicyType code)
        {
            return pt.DeleteCodePolicyType(code);
        }

        #endregion
        #region Salutation

        LinqSalutation s = new LinqSalutation();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public Salutation GetSalutation(int codeId)
        {
            return s.GetSalutation(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Salutation> GetSalutations(string sortExpression, int page)
        {
            return s.GetSalutations(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<Salutation> GetSalutations(string sortExpression)
        {
            return s.GetSalutations(sortExpression);
        }


        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertSalutation(Salutation code)
        {
            s.InsertSalutation(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateSalutation(Salutation code)
        {
            return s.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeSalutation(Salutation code)
        {
            return s.DeleteCodeSalutation(code);
        }

        #endregion
        #region SOType

        LinqSOType sot = new LinqSOType();

        [DataObjectMethod(DataObjectMethodType.Select)]
        public SOType GetSOType(int codeId)
        {
            return sot.GetSOType(codeId);
        }

        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<SOType> GetSOTypes(string sortExpression,int page)
        {
            return sot.GetSOTypes(sortExpression, page);
        }
        [DataObjectMethod(DataObjectMethodType.Select)]
        public List<SOType> GetSOTypes(string sortExpression)
        {
            return sot.GetSOTypes(sortExpression);
        }

        [DataObjectMethod(DataObjectMethodType.Insert)]
        public void InsertSOType(SOType code)
        {
            sot.InsertSOType(code);
        }

        [DataObjectMethod(DataObjectMethodType.Update)]
        public int UpdateSOType(SOType code)
        {
            return sot.UpdateCode(code);
        }


        [DataObjectMethod(DataObjectMethodType.Delete)]
        public int DeleteCodeSOType(SOType code)
        {
            return sot.DeleteCodeSOType(code);
        }

        #endregion


    }
}
